home *** CD-ROM | disk | FTP | other *** search
/ MacHack 2000 / MacHack 2000.toast / pc / The Hacks / Genie / Projects / Pedestal / Source / Includes / PedApplication.hh < prev    next >
Encoding:
Text File  |  2000-06-24  |  2.7 KB  |  100 lines

  1. /*    =================
  2.  *    PedApplication.hh
  3.  *    =================
  4.  *    
  5.  *    Implemented by PedApplication.cc
  6.  */
  7.  
  8. #pragma once
  9.  
  10. #include <Events.h>
  11.  
  12. #include "NGLList.hh"
  13.  
  14. #include "AEAModelRoot.hh"
  15. //#include "AEAModelName.hh"
  16.  
  17. #include "PedTask.hh"
  18. #include "PedModelApplication.hh"
  19. #include "PedMenuBar.hh"
  20. #include "PedAgentAboutBox.hh"
  21. #include "PedCommandAbout.hh"
  22. #include "PedCommandNew.hh"
  23. #include "PedCommandOpen.hh"
  24. #include "PedCommandClose.hh"
  25. #include "PedCommandQuit.hh"
  26. //#include "PedCommandUndo.hh"
  27. #include "PedCommandCut.hh"
  28. #include "PedCommandCopy.hh"
  29. #include "PedCommandPaste.hh"
  30. #include "PedCommandClear.hh"
  31. //#include "PedCommandSelectAll.hh"
  32.  
  33. class Ped1AppProcess;
  34.  
  35. class PedApplication : public PedTask {
  36. public:
  37.     // Constructor & destructor.
  38.     PedApplication();
  39.     virtual ~PedApplication();
  40.     
  41.     // OSL stuff.
  42.     //virtual DescType Class() const {return cApplication;}
  43.     //virtual void GetProperty(DescType inDesiredClass, DescType inPropertyID, AEAModel *&outObject) const;
  44.     //virtual void CreateObject(DescType inNewClass) {}
  45.     
  46.     // Event processing
  47.     virtual void DispatchNullEvent(EventRecord &inEvent);
  48.     virtual void DispatchEvent(EventRecord &inEvent);
  49.     
  50.     // Control
  51.     virtual void PreInit(); // What must before console init.
  52.     virtual void Run(); // This calls the main event loop.
  53.     
  54.     // Event responding
  55.     virtual void NotifyOpenAppEvent(); // Respond to an Open Application event.
  56.     virtual void NotifyOpenDocEvent(); // Respond to an Open Documents event.
  57.     virtual void NotifyPrintDocEvent(); // Respond to a Print Documents event.
  58.     virtual void NotifyQuitEvent(); // Respond to a Quit event.
  59.     
  60.     virtual void DoAbout(); // Respond to 'show about box'.
  61.     
  62. protected:
  63.     virtual void InstallAECallbacks(AEAModelRoot &inAppModel);
  64.     virtual void InstallMenuCommands();
  65.     virtual void MyPreInit();
  66.     virtual void Initialize();
  67.     
  68.     // Event processing routines.
  69.     virtual void DispatchHighLevelEvent(EventRecord &inEvent);
  70.     virtual void DispatchMouseDown(EventRecord &inEvent);
  71.     virtual void DispatchKey(EventRecord &inEvent);
  72.     virtual void DispatchActivate(EventRecord &inEvent);
  73.     virtual void DispatchUpdate(EventRecord &inEvent);
  74.     virtual void DispatchDiskInsert(EventRecord &inEvent);
  75.     
  76.     virtual void EventLoop(); // This is the main event loop.
  77.     
  78. protected:
  79.     Ped1AppProcess &mProcess;
  80.     PedModelApplication mModel;
  81.     //AEAModelName *mName;
  82.     PedMenuBar mMenuBar;
  83.     PedCommandAbout mAboutCmd;
  84.     PedCommandNew mNewCmd;
  85.     PedCommandOpen mOpenCmd;
  86.     PedCommandClose mCloseCmd;
  87.     PedCommandQuit mQuitCmd;
  88.     //PedCommandUndo mUndoCmd;
  89.     PedCommandCut mCutCmd;
  90.     PedCommandCopy mCopyCmd;
  91.     PedCommandPaste mPasteCmd;
  92.     PedCommandClear mClearCmd;
  93.     //PedCommandSelectAll mSelectAllCmd;
  94.     bool mPreInitDone;
  95.     bool mOpenAppReceived;
  96.     bool mOpenDocReceived;
  97.     bool mQuitReceived;
  98.     PedAgentAboutBox mAboutBox;
  99. };
  100.